package own.zch.api;

import java.util.HashMap;
import java.util.Map;

import com.cndym.adapterForMobile.IFunction;
import com.cndym.utils.SpringUtils;

import own.zch.utils.CreateMD5Util;

/***
 * SportMatchesFuncTest.java
 *
 * �ŷ���
 *
 * 2016-4-19
 */
public class SportMatchesFuncTest {
	public static void main(String[] args) {
		System.out.println(new SportMatchesFuncTest().getString());
	}

	public String getString() {

		/*--------------------凯利指数----------------------------*/

		/*
		 * 
		 * 
		 * 
		 * http://10.0.3.141:8080/clientInterface?msg={"platform":"04","sysVer":
		 * "android 6.0.1","sid":"8001","softVer":"30106","msg":
		 * "{\"lotteryCode\":\"200\",\"token\":\"e232ceab96c8c38830f7c8592a37de67d6ba21aebd0acc5986dbfee27886e09ecf7087aee91980ac2ccabbc257974c3af86fbbdc954c1222\",\"matchStatus\":\"3\"}"
		 * ,"cmd":"4501","func":"sportMatches","machId":"867451024005099",
		 * "height":"1920","width":"1080","md5":
		 * "002aac708368f3f51100f6671640ff8f"}
		 * 
		 * 
		 */

		/* 测试比赛 */

		Map<String, String> m = new HashMap<String, String>();
		m.put("platform", "platform");
		m.put("sid", "8001");
		m.put("machId", "352284040670808");
		m.put("func", "sportMatches");
		m.put("msg", "{\"lotteryCode\":\"200\",\"matchStatus\":\"2\"}");
		m.put("md5", CreateMD5Util.getMd5ByMap(m));
		IFunction trendFunc = (IFunction) SpringUtils.getBean("sportMatchesFunc");
		String string = trendFunc.function(m).toString();
    	long millis = System.currentTimeMillis();
		trendFunc.function(m).toString();
		long millis2 = System.currentTimeMillis();
		System.err.println(string);
		System.out.println(millis2 - millis);
		return string;

		// m.put("msg","{\"lotteryCode\":\"200\",\"matchStatus\":\"2\",\"matchTime\":\"20160512\",\"userCode\":\"20160426105142139808\"}");
		// m.put("msg", "{\"lotteryCode\":\"200\",\"matchStatus\":\"01\"}");

		/* 添加关注脚本 */

	}
}
